<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Admin\RegisterController;
use App\Http\Controllers\Admin\LoginController;
use App\Http\Controllers\Common\BaseConfigController;
use App\Http\Controllers\Car\CarServiceController;
use App\Http\Controllers\Car\CarController;
use App\Http\Controllers\Car\CalendarController;
use App\Http\Controllers\Car\SundryController;
use App\Http\Controllers\Car\AtividadeController;
use App\Http\Controllers\Order\OrderController;
use App\Http\Controllers\Common\UploadController;
use App\Http\Controllers\Car\CarSignController;
use App\Http\Controllers\Car\CommentController;
use App\Http\Controllers\Coupon\CouponController;
use App\Http\Controllers\Coupon\CouponLogController;
use App\Http\Controllers\SystemManager\LeaseDailyController;
use App\Http\Controllers\SystemManager\HourPriceController;
use App\Http\Controllers\SystemManager\ExDrinkController;
Route::prefix('upload')->group(function(){
    Route::post('single',[UploadController::class,'upload']);
    Route::post('multi',[UploadController::class,'multiImgs']);
});
//注册登录

Route::get('/register', [RegisterController::class,'register']);
Route::post('/login', [LoginController::class,'login']);
Route::post('/checkpwd', [LoginController::class,'checkpwd']);

//基础配置
Route::prefix('config')->group(function(){
    Route::get('index',[BaseConfigController::class,'index']);
    Route::post('store',[BaseConfigController::class,'store']);
});
//精选服务
Route::prefix('carservice')->group(function(){
    Route::get('index',[CarServiceController::class,'index']);
    Route::post('store',[CarServiceController::class,'store']);
    Route::post('update',[CarServiceController::class,'update']);
    Route::post('destory',[CarServiceController::class,'destory']);
});
//车辆管理
Route::prefix('car')->group(function(){
    Route::post('index',[CarController::class,'index']);
    Route::post('store',[CarController::class,'store']);
    Route::post('eidt',[CarController::class,'eidt']);
    Route::post('update',[CarController::class,'update']);
    Route::post('destory',[CarController::class,'destory']);

});


//车辆一周价格管理
Route::prefix('calendar')->group(function(){
    Route::get('list',[CalendarController::class,'list']);
    Route::post('update',[CalendarController::class,'update']);
});
//车辆一周价格管理
Route::prefix('order')->group(function(){
    Route::get('list',[OrderController::class,'list']);
    Route::post('update',[OrderController::class,'update']);
    Route::post('detail',[OrderController::class,'orderDetail']);

});
//车牌管理
Route::prefix('sing')->group(function(){
    Route::get('list',[CarSignController::class,'list']);
    Route::post('store',[CarSignController::class,'store']);
    Route::post('eidt',[CarSignController::class,'eidt']);
    Route::post('update',[CarSignController::class,'update']);
    Route::post('destory',[CarSignController::class,'destory']);
});
//优惠券管理
Route::prefix('coupon')->group(function(){
    Route::get('list',[CouponController::class,'list']);
    Route::post('store',[CouponController::class,'store']);
    Route::post('eidt',[CouponController::class,'eidt']);
    Route::post('update',[CouponController::class,'update']);
    Route::post('destory',[CouponController::class,'destory']);
    Route::get('list_log',[CouponLogController::class,'list']);
});
//评论管理
Route::prefix('comment')->group(function(){
    Route::get('list',[CommentController::class,'list']);

    Route::post('eidt',[CommentController::class,'eidt']);
    Route::post('update',[CommentController::class,'update']);
    Route::post('destory',[CommentController::class,'destory']);
});
//系统管理

Route::prefix('system/lease')->group(function(){
    Route::get('list',[LeaseDailyController::class,'list']);
    Route::post('store',[LeaseDailyController::class,'store']);
    Route::post('eidt',[LeaseDailyController::class,'eidt']);
    Route::post('update',[LeaseDailyController::class,'update']);
    Route::post('destory',[LeaseDailyController::class,'destory']);
});
//优惠比例
Route::prefix('system/hour')->group(function(){
    Route::get('list',[HourPriceController::class,'list']);
    Route::post('store',[HourPriceController::class,'store']);
    Route::post('eidt',[HourPriceController::class,'eidt']);
    Route::post('update',[HourPriceController::class,'update']);
    Route::post('destory',[HourPriceController::class,'destory']);
});
//随车饮料
Route::prefix('system/drink')->group(function(){
    Route::get('list',[ExDrinkController::class,'list']);
    Route::post('store',[ExDrinkController::class,'store']);
    Route::post('eidt',[ExDrinkController::class,'eidt']);
    Route::post('update',[ExDrinkController::class,'update']);
    Route::post('destory',[ExDrinkController::class,'destory']);
});

//车辆杂项列表
Route::prefix('sundry')->group(function(){
    Route::post('list',[SundryController::class,'list']);
    Route::post('store',[SundryController::class,'store']);
    Route::post('eidt',[SundryController::class,'eidt']);
    Route::post('update',[SundryController::class,'update']);
    Route::post('destory',[SundryController::class,'destory']);
});

// 营销活动
Route::prefix('atividade')->group(function(){
    Route::post('list',[AtividadeController::class,'list']);
    Route::post('store',[AtividadeController::class,'store']);
    Route::post('eidt',[AtividadeController::class,'eidt']);
    Route::post('update',[AtividadeController::class,'update']);
    Route::post('destory',[AtividadeController::class,'destory']);
});